import request from '@/util/request'

export function downloadDevice(data) {
  return request({
    url: '/iot/device/download',
    method: 'post',
    data
  })
}

export function uploadDevice(data) {
  return request({
    url: '/iot/device/upload',
    method: 'post',
    data
  })
}

export function pageGetDeviceByCompany(data) {
  return request({
    url: '/iot/device/pageGetByCompany',
    method: 'post',
    data
  })
}

export function sendToDevice(data) {
  return request({
    url: '/iot/device/send',
    method: 'post',
    data
  })
}

export function pageGetAllDeviceDetails(data) {
  return request({
    url: '/iot/device/pageGetDetailsAll',
    method: 'post',
    data
  })
}

export function pageGetDeviceDetailsByCompany(data) {
  return request({
    url: '/iot/device/pageGetDetailsByCompany',
    method: 'post',
    data
  })
}

export function pageGetAllDevice(data) {
  return request({
    url: '/iot/device/pageGetAll',
    method: 'post',
    data
  })
}

export function listDeviceByCompany(data) {
  return request({
    url: '/iot/device/listByCompany',
    method: 'post',
    data
  })
}

export function listDeviceByCompanyGEO(data) {
  return request({
    url: '/iot/device/listByCompanyGEO',
    method: 'post',
    data
  })
}

export function listAllDevice(data) {
  return request({
    url: '/iot/device/listAll',
    method: 'post',
    data
  })
}

export function listAllDeviceGEO(data) {
  return request({
    url: '/iot/device/listAllGEO',
    method: 'post',
    data
  })
}

export function listDeviceIcon(data) {
  return request({
    url: '/iot/device/icon/list',
    method: 'post',
    data
  })
}

export function outOfContactDevice(data) {
  return request({
    url: '/iot/device/outOfContact',
    method: 'post',
    data
  })
}


export function registerDevice(data) {
  return request({
    url: '/iot/device/register',
    method: 'post',
    data
  })
}

export function detailsDevice(data) {
  return request({
    url: '/iot/device/details',
    method: 'post',
    data
  })
}

export function getDeviceStatus(data) {
  return request({
    url: '/iot/device/getStatus',
    method: 'post',
    data
  })
}

export function getDevice(data) {
  return request({
    url: '/iot/device/get',
    method: 'post',
    data
  })
}

export function getDeviceInfo(data) {
  return request({
    url: '/iot/device/info',
    method: 'post',
    data
  })
}

export function getDeviceDetails(data) {
  return request({
    url: '/iot/device/info',
    method: 'post',
    data
  })
}

export function updateDevice(data) {
  return request({
    url: '/iot/device/update',
    method: 'post',
    data
  })
}


export function updateDeviceUser(data) {
  return request({
    url: '/iot/device/updateUser',
    method: 'post',
    data
  })
}

export function updateDeviceCompany(data) {
  return request({
    url: '/iot/device/updateCompany',
    method: 'post',
    data
  })
}

export function updateDeviceDept(data) {
  return request({
    url: '/iot/device/updateDept',
    method: 'post',
    data
  })
}

export function deviceBindUser(data) {
  return request({
    url: '/iot/device/bindUser',
    method: 'post',
    data
  })
}

export function deviceUnbindUser(data) {
  return request({
    url: '/iot/device/unbindUser',
    method: 'post',
    data
  })
}

export function deleteDeviceByDeviceCore(data) {
  return request({
    url: '/iot/device/deleteByDeviceCore',
    method: 'post',
    data
  })
}

export function setDeviceEnable(data) {
  return request({
    url: '/iot/device/setEnable',
    method: 'post',
    data
  })
}

export function getSecret(data) {
  return request({
    url: '/iot/device/secret/get',
    method: 'post',
    data
  })
}

export function cleanWarn(data) {
  return request({
    url: '/iot/device/cleanWarn',
    method: 'post',
    data
  })
}

export function setDeviceSettingTemplate(data) {
  return request({
    url: '/iot/device/setTemplate/setting',
    method: 'post',
    data
  })
}

export function setDeviceExplainTemplate(data) {
  return request({
    url: '/iot/device/setTemplate/explain',
    method: 'post',
    data
  })
}

export function setDeviceParamTemplate(data) {
  return request({
    url: '/iot/device/setTemplate/param',
    method: 'post',
    data
  })
}

export function provinceDeviceNum(data) {
  return request({
    url: '/iot/device/provinceNum',
    method: 'post',
    data
  })
}

export function provinceDeviceNumOrDevice(data) {
  return request({
    url: '/iot/device/provinceNumOrDevice',
    method: 'post',
    data
  })
}

export function cityDeviceNum(data) {
  return request({
    url: '/iot/device/cityNum',
    method: 'post',
    data
  })
}
export function cityDeviceNumOrDevice(data) {
  return request({
    url: '/iot/device/cityNumOrDevice',
    method: 'post',
    data
  })
}

export function productDeviceNum(data) {
  return request({
    url: '/iot/device/productNum',
    method: 'post',
    data
  })
}

export function seriesDeviceNum(data) {
  return request({
    url: '/iot/device/seriesNum',
    method: 'post',
    data
  })
}

export function provinceAllDeviceNum(data) {
  return request({
    url: '/iot/device/provinceAllNum',
    method: 'post',
    data
  })
}

export function cityAllDeviceNum(data) {
  return request({
    url: '/iot/device/cityAllNum',
    method: 'post',
    data
  })
}

export function productAllDeviceNum(data) {
  return request({
    url: '/iot/device/productAllNum',
    method: 'post',
    data
  })
}

export function seriesAllDeviceNum(data) {
  return request({
    url: '/iot/device/seriesAllNum',
    method: 'post',
    data
  })
}
